package com.dragon.modules.yuegou.query.wallet;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.wallet.Mer2memBoughtcardTradeEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商户到会员悦卡交易（会员自购的悦卡，商户向会员退款） 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-06-03 15:20:36
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class Mer2memBoughtcardTradeQuery extends Mer2memBoughtcardTradeEntity implements Query<Mer2memBoughtcardTradeEntity> {

    /** 会员悦卡交易记录ID查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 交易号查询条件 */
	@JsonUnwrapped(prefix = "tradeId")
	private Condition<String> tradeIdCondition;

    /** 会员ID（冗余）查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 会员钱包ID（冗余）查询条件 */
	@JsonUnwrapped(prefix = "memberWalletId")
	private Condition<String> memberWalletIdCondition;

    /** 会员悦卡ID查询条件 */
	@JsonUnwrapped(prefix = "memberCardId")
	private Condition<String> memberCardIdCondition;

    /** 会员悦卡卡号查询条件 */
	@JsonUnwrapped(prefix = "memberCardNo")
	private Condition<String> memberCardNoCondition;

    /** 悦卡模板ID（冗余）查询条件 */
	@JsonUnwrapped(prefix = "cardTemplateId")
	private Condition<String> cardTemplateIdCondition;

    /** 商户ID（冗余）查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

    /** 商户钱包ID查询条件 */
	@JsonUnwrapped(prefix = "merchantWalletId")
	private Condition<String> merchantWalletIdCondition;

    /** 订单号查询条件 */
	@JsonUnwrapped(prefix = "orderNo")
	private Condition<String> orderNoCondition;

    /** 退款单号查询条件 */
	@JsonUnwrapped(prefix = "refundNo")
	private Condition<String> refundNoCondition;

    /** 交易金额查询条件 */
	@JsonUnwrapped(prefix = "amount")
	private Condition<BigDecimal> amountCondition;

    /** 交易前悦卡余额查询条件 */
	@JsonUnwrapped(prefix = "cardAmountBefore")
	private Condition<BigDecimal> cardAmountBeforeCondition;

    /** 交易后悦卡余额查询条件 */
	@JsonUnwrapped(prefix = "cardAmountAfter")
	private Condition<BigDecimal> cardAmountAfterCondition;

    /** 交易前商户悦卡余额查询条件 */
	@JsonUnwrapped(prefix = "merchantAmountBefore")
	private Condition<BigDecimal> merchantAmountBeforeCondition;

    /** 交易后商户悦卡余额查询条件 */
	@JsonUnwrapped(prefix = "merchantAmountAfter")
	private Condition<BigDecimal> merchantAmountAfterCondition;

    /** 交易时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public Mer2memBoughtcardTradeQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public Mer2memBoughtcardTradeQuery(Mer2memBoughtcardTradeEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public Mer2memBoughtcardTradeQuery(Mer2memBoughtcardTradeQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.tradeIdCondition != null) {
			this.tradeIdCondition = other.tradeIdCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.memberWalletIdCondition != null) {
			this.memberWalletIdCondition = other.memberWalletIdCondition.copy();
		}
		if(other.memberCardIdCondition != null) {
			this.memberCardIdCondition = other.memberCardIdCondition.copy();
		}
		if(other.memberCardNoCondition != null) {
			this.memberCardNoCondition = other.memberCardNoCondition.copy();
		}
		if(other.cardTemplateIdCondition != null) {
			this.cardTemplateIdCondition = other.cardTemplateIdCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.merchantWalletIdCondition != null) {
			this.merchantWalletIdCondition = other.merchantWalletIdCondition.copy();
		}
		if(other.orderNoCondition != null) {
			this.orderNoCondition = other.orderNoCondition.copy();
		}
		if(other.refundNoCondition != null) {
			this.refundNoCondition = other.refundNoCondition.copy();
		}
		if(other.amountCondition != null) {
			this.amountCondition = other.amountCondition.copy();
		}
		if(other.cardAmountBeforeCondition != null) {
			this.cardAmountBeforeCondition = other.cardAmountBeforeCondition.copy();
		}
		if(other.cardAmountAfterCondition != null) {
			this.cardAmountAfterCondition = other.cardAmountAfterCondition.copy();
		}
		this.setOther(other);
	}
	private void setOther(Mer2memBoughtcardTradeQuery other){
		if(other.merchantAmountBeforeCondition != null) {
			this.merchantAmountBeforeCondition = other.merchantAmountBeforeCondition.copy();
		}
		if(other.merchantAmountAfterCondition != null) {
			this.merchantAmountAfterCondition = other.merchantAmountAfterCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<Mer2memBoughtcardTradeEntity> toQueryWrapper() {
		QueryWrapper<Mer2memBoughtcardTradeEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (tradeIdCondition != null) {
			tradeIdCondition.toWrapper(wrapper, COL_TRADE_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (memberWalletIdCondition != null) {
			memberWalletIdCondition.toWrapper(wrapper, COL_MEMBER_WALLET_ID);
		}
		if (memberCardIdCondition != null) {
			memberCardIdCondition.toWrapper(wrapper, COL_MEMBER_CARD_ID);
		}
		if (memberCardNoCondition != null) {
			memberCardNoCondition.toWrapper(wrapper, COL_MEMBER_CARD_NO);
		}
		if (cardTemplateIdCondition != null) {
			cardTemplateIdCondition.toWrapper(wrapper, COL_CARD_TEMPLATE_ID);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (merchantWalletIdCondition != null) {
			merchantWalletIdCondition.toWrapper(wrapper, COL_MERCHANT_WALLET_ID);
		}
		if (orderNoCondition != null) {
			orderNoCondition.toWrapper(wrapper, COL_ORDER_NO);
		}
		if (refundNoCondition != null) {
			refundNoCondition.toWrapper(wrapper, COL_REFUND_NO);
		}
		if (amountCondition != null) {
			amountCondition.toWrapper(wrapper, COL_AMOUNT);
		}
		if (cardAmountBeforeCondition != null) {
			cardAmountBeforeCondition.toWrapper(wrapper, COL_CARD_AMOUNT_BEFORE);
		}
		if (cardAmountAfterCondition != null) {
			cardAmountAfterCondition.toWrapper(wrapper, COL_CARD_AMOUNT_AFTER);
		}
		return getQueryWrapper(wrapper);
	}
	private QueryWrapper<Mer2memBoughtcardTradeEntity> getQueryWrapper(QueryWrapper<Mer2memBoughtcardTradeEntity> wrapper){
		if (merchantAmountBeforeCondition != null) {
			merchantAmountBeforeCondition.toWrapper(wrapper, COL_MERCHANT_AMOUNT_BEFORE);
		}
		if (merchantAmountAfterCondition != null) {
			merchantAmountAfterCondition.toWrapper(wrapper, COL_MERCHANT_AMOUNT_AFTER);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回会员悦卡交易记录ID查询条件
	 * 
	 * @return idCondition 会员悦卡交易记录ID查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取会员悦卡交易记录ID查询条件
	 * 
	 * @return idCondition 会员悦卡交易记录ID查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置会员悦卡交易记录ID查询条件
	 * 
	 * @param idCondition 会员悦卡交易记录ID查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回交易号查询条件
	 * 
	 * @return tradeIdCondition 交易号查询条件
	 */
	public Condition<String> tradeId() {
		this.tradeIdCondition = new Condition<>();
		return this.tradeIdCondition;
	}
	
	/**
	 * 获取交易号查询条件
	 * 
	 * @return tradeIdCondition 交易号查询条件
	 */
	public Condition<String> getTradeIdCondition() {
		return tradeIdCondition;
	}

	/**
	 * 设置交易号查询条件
	 * 
	 * @param tradeIdCondition 交易号查询条件
	 */
	public void setTradeIdCondition(Condition<String> tradeIdCondition) {
		this.tradeIdCondition = tradeIdCondition;
	}

	/**
	 * 构造并返回会员ID（冗余）查询条件
	 * 
	 * @return memberIdCondition 会员ID（冗余）查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID（冗余）查询条件
	 * 
	 * @return memberIdCondition 会员ID（冗余）查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID（冗余）查询条件
	 * 
	 * @param memberIdCondition 会员ID（冗余）查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回会员钱包ID（冗余）查询条件
	 * 
	 * @return memberWalletIdCondition 会员钱包ID（冗余）查询条件
	 */
	public Condition<String> memberWalletId() {
		this.memberWalletIdCondition = new Condition<>();
		return this.memberWalletIdCondition;
	}
	
	/**
	 * 获取会员钱包ID（冗余）查询条件
	 * 
	 * @return memberWalletIdCondition 会员钱包ID（冗余）查询条件
	 */
	public Condition<String> getMemberWalletIdCondition() {
		return memberWalletIdCondition;
	}

	/**
	 * 设置会员钱包ID（冗余）查询条件
	 * 
	 * @param memberWalletIdCondition 会员钱包ID（冗余）查询条件
	 */
	public void setMemberWalletIdCondition(Condition<String> memberWalletIdCondition) {
		this.memberWalletIdCondition = memberWalletIdCondition;
	}

	/**
	 * 构造并返回会员悦卡ID查询条件
	 * 
	 * @return memberCardIdCondition 会员悦卡ID查询条件
	 */
	public Condition<String> memberCardId() {
		this.memberCardIdCondition = new Condition<>();
		return this.memberCardIdCondition;
	}
	
	/**
	 * 获取会员悦卡ID查询条件
	 * 
	 * @return memberCardIdCondition 会员悦卡ID查询条件
	 */
	public Condition<String> getMemberCardIdCondition() {
		return memberCardIdCondition;
	}

	/**
	 * 设置会员悦卡ID查询条件
	 * 
	 * @param memberCardIdCondition 会员悦卡ID查询条件
	 */
	public void setMemberCardIdCondition(Condition<String> memberCardIdCondition) {
		this.memberCardIdCondition = memberCardIdCondition;
	}

	/**
	 * 构造并返回会员悦卡卡号查询条件
	 * 
	 * @return memberCardNoCondition 会员悦卡卡号查询条件
	 */
	public Condition<String> memberCardNo() {
		this.memberCardNoCondition = new Condition<>();
		return this.memberCardNoCondition;
	}
	
	/**
	 * 获取会员悦卡卡号查询条件
	 * 
	 * @return memberCardNoCondition 会员悦卡卡号查询条件
	 */
	public Condition<String> getMemberCardNoCondition() {
		return memberCardNoCondition;
	}

	/**
	 * 设置会员悦卡卡号查询条件
	 * 
	 * @param memberCardNoCondition 会员悦卡卡号查询条件
	 */
	public void setMemberCardNoCondition(Condition<String> memberCardNoCondition) {
		this.memberCardNoCondition = memberCardNoCondition;
	}

	/**
	 * 构造并返回悦卡模板ID（冗余）查询条件
	 * 
	 * @return cardTemplateIdCondition 悦卡模板ID（冗余）查询条件
	 */
	public Condition<String> cardTemplateId() {
		this.cardTemplateIdCondition = new Condition<>();
		return this.cardTemplateIdCondition;
	}
	
	/**
	 * 获取悦卡模板ID（冗余）查询条件
	 * 
	 * @return cardTemplateIdCondition 悦卡模板ID（冗余）查询条件
	 */
	public Condition<String> getCardTemplateIdCondition() {
		return cardTemplateIdCondition;
	}

	/**
	 * 设置悦卡模板ID（冗余）查询条件
	 * 
	 * @param cardTemplateIdCondition 悦卡模板ID（冗余）查询条件
	 */
	public void setCardTemplateIdCondition(Condition<String> cardTemplateIdCondition) {
		this.cardTemplateIdCondition = cardTemplateIdCondition;
	}

	/**
	 * 构造并返回商户ID（冗余）查询条件
	 * 
	 * @return merchantIdCondition 商户ID（冗余）查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}
	
	/**
	 * 获取商户ID（冗余）查询条件
	 * 
	 * @return merchantIdCondition 商户ID（冗余）查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置商户ID（冗余）查询条件
	 * 
	 * @param merchantIdCondition 商户ID（冗余）查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回商户钱包ID查询条件
	 * 
	 * @return merchantWalletIdCondition 商户钱包ID查询条件
	 */
	public Condition<String> merchantWalletId() {
		this.merchantWalletIdCondition = new Condition<>();
		return this.merchantWalletIdCondition;
	}
	
	/**
	 * 获取商户钱包ID查询条件
	 * 
	 * @return merchantWalletIdCondition 商户钱包ID查询条件
	 */
	public Condition<String> getMerchantWalletIdCondition() {
		return merchantWalletIdCondition;
	}

	/**
	 * 设置商户钱包ID查询条件
	 * 
	 * @param merchantWalletIdCondition 商户钱包ID查询条件
	 */
	public void setMerchantWalletIdCondition(Condition<String> merchantWalletIdCondition) {
		this.merchantWalletIdCondition = merchantWalletIdCondition;
	}

	/**
	 * 构造并返回订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> orderNo() {
		this.orderNoCondition = new Condition<>();
		return this.orderNoCondition;
	}
	
	/**
	 * 获取订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> getOrderNoCondition() {
		return orderNoCondition;
	}

	/**
	 * 设置订单号查询条件
	 * 
	 * @param orderNoCondition 订单号查询条件
	 */
	public void setOrderNoCondition(Condition<String> orderNoCondition) {
		this.orderNoCondition = orderNoCondition;
	}

	/**
	 * 构造并返回退款单号查询条件
	 * 
	 * @return refundNoCondition 退款单号查询条件
	 */
	public Condition<String> refundNo() {
		this.refundNoCondition = new Condition<>();
		return this.refundNoCondition;
	}
	
	/**
	 * 获取退款单号查询条件
	 * 
	 * @return refundNoCondition 退款单号查询条件
	 */
	public Condition<String> getRefundNoCondition() {
		return refundNoCondition;
	}

	/**
	 * 设置退款单号查询条件
	 * 
	 * @param refundNoCondition 退款单号查询条件
	 */
	public void setRefundNoCondition(Condition<String> refundNoCondition) {
		this.refundNoCondition = refundNoCondition;
	}

	/**
	 * 构造并返回交易金额查询条件
	 * 
	 * @return amountCondition 交易金额查询条件
	 */
	public Condition<BigDecimal> amount() {
		this.amountCondition = new Condition<>();
		return this.amountCondition;
	}
	
	/**
	 * 获取交易金额查询条件
	 * 
	 * @return amountCondition 交易金额查询条件
	 */
	public Condition<BigDecimal> getAmountCondition() {
		return amountCondition;
	}

	/**
	 * 设置交易金额查询条件
	 * 
	 * @param amountCondition 交易金额查询条件
	 */
	public void setAmountCondition(Condition<BigDecimal> amountCondition) {
		this.amountCondition = amountCondition;
	}

	/**
	 * 构造并返回交易前悦卡余额查询条件
	 * 
	 * @return cardAmountBeforeCondition 交易前悦卡余额查询条件
	 */
	public Condition<BigDecimal> cardAmountBefore() {
		this.cardAmountBeforeCondition = new Condition<>();
		return this.cardAmountBeforeCondition;
	}
	
	/**
	 * 获取交易前悦卡余额查询条件
	 * 
	 * @return cardAmountBeforeCondition 交易前悦卡余额查询条件
	 */
	public Condition<BigDecimal> getCardAmountBeforeCondition() {
		return cardAmountBeforeCondition;
	}

	/**
	 * 设置交易前悦卡余额查询条件
	 * 
	 * @param cardAmountBeforeCondition 交易前悦卡余额查询条件
	 */
	public void setCardAmountBeforeCondition(Condition<BigDecimal> cardAmountBeforeCondition) {
		this.cardAmountBeforeCondition = cardAmountBeforeCondition;
	}

	/**
	 * 构造并返回交易后悦卡余额查询条件
	 * 
	 * @return cardAmountAfterCondition 交易后悦卡余额查询条件
	 */
	public Condition<BigDecimal> cardAmountAfter() {
		this.cardAmountAfterCondition = new Condition<>();
		return this.cardAmountAfterCondition;
	}
	
	/**
	 * 获取交易后悦卡余额查询条件
	 * 
	 * @return cardAmountAfterCondition 交易后悦卡余额查询条件
	 */
	public Condition<BigDecimal> getCardAmountAfterCondition() {
		return cardAmountAfterCondition;
	}

	/**
	 * 设置交易后悦卡余额查询条件
	 * 
	 * @param cardAmountAfterCondition 交易后悦卡余额查询条件
	 */
	public void setCardAmountAfterCondition(Condition<BigDecimal> cardAmountAfterCondition) {
		this.cardAmountAfterCondition = cardAmountAfterCondition;
	}

	/**
	 * 构造并返回交易前商户悦卡余额查询条件
	 * 
	 * @return merchantAmountBeforeCondition 交易前商户悦卡余额查询条件
	 */
	public Condition<BigDecimal> merchantAmountBefore() {
		this.merchantAmountBeforeCondition = new Condition<>();
		return this.merchantAmountBeforeCondition;
	}
	
	/**
	 * 获取交易前商户悦卡余额查询条件
	 * 
	 * @return merchantAmountBeforeCondition 交易前商户悦卡余额查询条件
	 */
	public Condition<BigDecimal> getMerchantAmountBeforeCondition() {
		return merchantAmountBeforeCondition;
	}

	/**
	 * 设置交易前商户悦卡余额查询条件
	 * 
	 * @param merchantAmountBeforeCondition 交易前商户悦卡余额查询条件
	 */
	public void setMerchantAmountBeforeCondition(Condition<BigDecimal> merchantAmountBeforeCondition) {
		this.merchantAmountBeforeCondition = merchantAmountBeforeCondition;
	}

	/**
	 * 构造并返回交易后商户悦卡余额查询条件
	 * 
	 * @return merchantAmountAfterCondition 交易后商户悦卡余额查询条件
	 */
	public Condition<BigDecimal> merchantAmountAfter() {
		this.merchantAmountAfterCondition = new Condition<>();
		return this.merchantAmountAfterCondition;
	}
	
	/**
	 * 获取交易后商户悦卡余额查询条件
	 * 
	 * @return merchantAmountAfterCondition 交易后商户悦卡余额查询条件
	 */
	public Condition<BigDecimal> getMerchantAmountAfterCondition() {
		return merchantAmountAfterCondition;
	}

	/**
	 * 设置交易后商户悦卡余额查询条件
	 * 
	 * @param merchantAmountAfterCondition 交易后商户悦卡余额查询条件
	 */
	public void setMerchantAmountAfterCondition(Condition<BigDecimal> merchantAmountAfterCondition) {
		this.merchantAmountAfterCondition = merchantAmountAfterCondition;
	}

	/**
	 * 构造并返回交易时间查询条件
	 * 
	 * @return createdTimeCondition 交易时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取交易时间查询条件
	 * 
	 * @return createdTimeCondition 交易时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置交易时间查询条件
	 * 
	 * @param createdTimeCondition 交易时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

}
